﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UltimatePlugin.Db.Cache;
using Zeta.Common;
using Zeta.Internals.Actors;

namespace UltimatePlugin.Db.SpellManagement
{
    internal class SpellOnTarget : Spell
    {
        private int _TargetGuid; 

        public SpellOnTarget(SNOPower power, int targetGuid)
            : base (power)
        {
            _TargetGuid = targetGuid;
        }

        public override void Cast()
        {
            if (SpellManager.CanUse(Power))
            {
                SpellManager.Use(Power, Vector3.Zero, EnvironmentCache.CurrentWorldID, _TargetGuid);
            }
        }
    }
}
